<template>
	<view class="manage_box box">
		<view class="mt_12">
			<view class="" v-if="dataList.length >0">
				<template v-for="(item,index) in dataList">
					<view class="info_box box   bc_fff" :key="index">
						<view class="info_top w100 height_76">
							<view class="top_left">
								<view class="width_52 height_52 br_42 photo_view">
									<image class="user_avatar"
										:src="item.avatar?item.avatar:ossUrl +'/avatar_empty.png'" mode=""></image>
								</view>
								<view class="info_view ml_12">
									<view class="name_box">
										<view class="fz_16 mr_8 fc_333">
											{{item.nickName}}
										</view>

										<image :src="ossUrl + '/info_'+item.memberLevel+'.png'"
											class="width_88 height_22" mode="">
										</image>
									</view>
									<view class="fz_12 fc_999 mt_8">
										{{item.registerTime}}
									</view>
								</view>

							</view>
							<view class="top_right fz_12 fc_999">
								<view class="bottom_left">
									<view class="number fz_16 fb mb-6">
										¥{{item.accountInfo.totalEnterprise||0}}
									</view>
									<view class="fz_12 fc_333 mt_6">
										消费总额
									</view>
								</view>
							</view>
						</view>
					</view>
				</template>
			</view>

			<Empty v-else :isInvite="true" :isRequest="isRequest"></Empty>
		</view>
		<view class="height_19">

		</view>
	</view>
</template>

<script>
	import Empty from "./empty.vue"
	export default {
		components: {
			Empty
		},
		props: {
			dataList: {
				type: Array,
				default: function() {
					return []
				}
			},
			ossUrl: {
				type: String,
				default: ""
			},
			isRequest: {
				type: Boolean,
				default: false
			}
		},
		mounted() {
			setTimeout(() => {

				console.log("邀请数据")
				console.log(this.dataList)
				console.log(this.dataList[0])
			}, 1000)
		},
		data() {
			return {}
		}
	}
</script>

<style lang="scss" scoped>
	.manage_box {

		.search_box {
			@include set_padding(14rpx, 16rpx);
		}

		.member_header {

			@include flex_box(row, nowrap, space-between, center);

			.header_left {
				@include set_padding(0rpx, 15rpx);
				@include flex_box(row, nowrap, center, center);
			}

			.header_right {
				@include flex_box(row, nowrap, center, center);
				border-left: 1rpx solid rgba(0, 0, 0, 0.1);
				;
			}
		}

		.info_box {
			@include set_padding(0rpx, 12rpx);

			.user_avatar {
				width: 100%;
				height: 100%;
				display: block;
			}

			.info_view {
				@include flex_box(column, wrap, flex-start, flex-start);

				.name_box {
					@include flex_box(row, nowrap, space-between, center);
				}
			}

			.info_top {
				border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
				@include flex_box(row, nowrap, space-between, center);

				.top_left {
					@include flex_box(row, nowrap, flex-start, center);

					.photo_view {
						overflow: hidden;
					}
				}
			}

			.bottom_left {
				@include flex_box(column, nowrap, flex-start, flex-end);

				.number {
					color: #FE5A1C;
				}
			}

			.info_bottom {
				@include flex_box(row, nowrap, space-between, center);



				.bottom_right {
					@include flex_box(row, nowrap, center, center);
					background-color: #323232;
				}
			}
		}
	}
</style>